-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: set local or session time_zone not work #4064
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that "local" is the default manner for setting session variable.
While global variable starts with @@
, we don't support any of them now:
Statement::SetVariables(set_var) => {
let var_name = set_var.variable.to_string().to_uppercase();
match var_name.as_str() {
// known vars
_ => {
return NotSupportedSnafu {
feat: format!("Unsupported set variable {}", var_name),
}
.fail()
}
}}
We don't have a plan to set global variables. This PR is trying to fix that |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4064 +/- ##
==========================================
- Coverage 85.33% 85.03% -0.31%
==========================================
Files 987 987
Lines 171204 171224 +20
==========================================
- Hits 146094 145597 -497
- Misses 25110 25627 +517 |
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
See #3887
The doc PR GreptimeTeam/docs#988
What's changed and what's your intention?
Fix
SET SESSION time_zone='Asia/Shanghai'
orSET LOCAL time_zone='Asia/Shanghai'
not work.Checklist